#include<stdio.h>
int main()
{
    int upper=0,lower=0,space=0,number=0,other=0,i=0;
    char *p,s[20];
    printf("input string\n");
    gets(s);
    p=&s[0];//指针指向数组S的起始位置
    while(*p!='\0')
    {
        if(('A'<=*p)&&(*p<='Z'))
        ++upper;
        else if(('a'<=*p)&&(*p<='z'))
        ++lower;
        else if((*p<='9')&&(*p>='0'))
        ++number;
        else if(*p==' ')
        ++space;
        else
            ++other;
            p++;
    }
    printf("upper is %d\nlower is %d\nnumber is %d\nspace is %d\nelse is %d\n",upper,lower,number,space,other);
    return 0;
}